package cn.sangyy.gift.mqlistener;

import cn.sangyy.gift.constant.MqConstant;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author SangYY
 * @date: 2023/06/24/9:32
 */
@Component
@RocketMQMessageListener(consumerGroup = MqConstant.SERVICE_USER_CONSUMER_GROUP,topic = MqConstant.REGISTER_SUCCESS_NOTE_TOPIC)
public class SendEmailConsumerListener implements RocketMQListener<String> {

    @Override
    public void onMessage(String phone) {
        String message = "手机为："+phone+"的新用户你好！欢迎注册蓉礼购平台，快登录领取福利吧。";
        System.out.println(message);
        // @TODO 发送短信
    }
}
